/ Assembly List / LJCNetCommon / LJCAssemblyReflect / GetConstructorSyntax

Namespace - LJCNetCommon


Parameters
constructorInfo - The ConstructorInfo object.

Returns

The Constructor syntax.

Syntax

C#
public String GetConstructorSyntax(ConstructorInfo constructorInfo = null)

Creates and returns the Constructor syntax. (E)

Example

C#
using System;
using System.Reflection;
using LJC.Net.Common;

public string RetrieveConstructorSyntax(string assemblyFileSpec, string fullTypeName
    , string constructorName, string[] parameterNames)
{
    string retValue = null;

    // These calls are not required if an LJCAssemblyReflect reference is
    // used and the the following set methods have already been executed.
    LJCAssemblyReflect assemblyReflect = new LJCAssemblyReflect();
    assemblyReflect.SetAssembly(assemblyFileSpec);
    assemblyReflect.SetTypeReference(fullTypeName);
    assemblyReflect.SetConstructorInfo(constructorName, parameterNames);
    
    retValue = assemblyReflect.GetConstructorSyntax();
    return retValue;
}

Copyright © Lester J. Clark and Contributors.
Licensed under the MIT License.